<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				var form = {
					username:'admin',
					password:'macro123',
				}
				$.ajax({
					type: 'post',
					url: 'http://118.89.176.28:8080/admin/login',
					dataType: 'json',
					contentType: 'application/json;charset=UTF-8',
					data: JSON.stringify(form)
				}).then((result) =>{
					console.log("请求成功");
					console.log(result);
					let data = result.data;
					let token = data.tokenHead + data.token;
					$.ajax({
						headers:{
							"Authorization": token
						},
						type: 'get',
						url: 'http://118.89.176.28:8080/admin/info/',
					}).then(result => {
						console.log(result);
					})
				},err => {
					console.log("请求失败");
					console.log(err);
				})
			})
		</script>
	</body>
</html>
